Jump to content

Making a bootable High Sierra USB Installer Entirely From Scratch in Windows or Linux Mint (without access to Mac or App Store Installer.app)


fusion71au
 Share

42 posts in this topic

Recommended Posts

Making a High Sierra USB Installer Entirely From Scratch in Linux Mint

Prerequisites

  1. 8GB or larger USB drive
  2. Linux Mint (virtualized is also OK, tested with Mint 17.3 & 18.1) and the following installed packages:  hfsplus, hfsprogs, gparted, gdisk, p7zip and dmg2img...
 

post-846696-0-68450600-1511427218_thumb.png

Download Installer Files Directly from Apple and Clover from SourceForge 
1)  Open terminal, create SharedSupport folder in ~/Downloads

mkdir ~/Downloads/SharedSupport

2)  Browse Apple's Regular Software Catalog and find the URLs to download the following 6 installer files...

  1. BaseSystem.dmg
  2. BaseSystem.chunklist
  3. InstallInfo.plist
  4. InstallESDDmg.pkg
  5. AppleDiagnostics.dmg
  6. AppleDiagnostics.chunklist

(Hint - search page for "InstallESD" to find its URL and others nearby)
 into ~/Downloads/SharedSupport.  A browser download manager (eg Chrono for Chrome, dTA for FireFox) is handy since InstallESD is >4GB ---> allows you to pause/resume interrupted download...
 3) Rename InstallESDDmg.pkg to InstallESD.dmg

mv ~/Downloads/SharedSupport/InstallESDDmg.pkg ~/Downloads/SharedSupport/InstallESD.dmg

4)  Edit InstallInfo.plist with a text editor to remove the chunklistURL and chunklistid keys for InstallESD, and renaming it from InstallESDDmg.pkg to InstallESD.dmg (example of edited file attached to post#1)...

post-846696-0-14287300-1511472961_thumb.png

post-846696-0-64042000-1511427524_thumb.png

Note:  You can verify the SHA1 checksum of your InstallESD.dmg and BaseSystem.dmg with the correct ones at this website.

5)  If you don't already have Clover installed, download the latest Clover.iso from SourceForge.  Extract the EFI folder to ~/Downloads...

 

 

post-846696-0-89018000-1511427846_thumb.png

post-846696-0-74647300-1511427861_thumb.png

post-846696-0-29546900-1511427875_thumb.png

post-846696-0-58876200-1511427891_thumb.png

 

6)  Determine the size of the "OS X Base System" HFS partition by listing contents of BaseSystem.dmg with 7z l command.  Here, 4.hfs=2008506368 bytes=1915.5 MB (1024x1024 bytes per MB) or 3922864 sectors (512 bytes per sector)...

 

 

 

fusion71au@fusion71au-VirtualBox ~ $ 7z l ~/Downloads/SharedSupport/BaseSystem.dmg

7-Zip [64] 9.20  Copyright © 1999-2010 Igor Pavlov  2010-11-18
p7zip Version 9.20 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,1 CPU)

Listing archive: ~/Downloads/SharedSupport/BaseSystem.dmg

--
Path = ~/Downloads/SharedSupport/BaseSystem.dmg
Type = Dmg
Method = copy[16]-13636K zero2[202]-593M zlib[503]-1436M-455M
Blocks = 721

   Date      Time    Attr         Size   Compressed  Name
------------------- ----- ------------ ------------  ------------------------
                    .....          512           30  0.MBR
                    .....          512           75  1.Primary GPT Header
                    .....        16384          116  2.Primary GPT Table
                    .....         3072            0  3.free
                    .....   2008506368    491582140  4.hfs
                    .....    134221312            0  5.free
                    .....        16384          116  6.Backup GPT Table
                    .....          512           76  7.Backup GPT Header
------------------- ----- ------------ ------------  ------------------------
                            2142765056    491582553  8 files, 0 folders

 

Prepare USB with GParted and Restore OS X Base System with dmg2img
 1)  Open GParted.  In this example, I have an 8GB installer disk, /dev/sdb, initialized as GPT from Device Menu... 

 

 

post-846696-0-58757000-1511427995_thumb.png

post-846696-0-20950400-1511428025_thumb.png

 

2)  Create the following 2 new partitions 
Part 1 200MB FAT32 labelled EFI
Part 2 5817MB HFS+ labelled Installer_App
Leave 2174MB free for OS X Base System restore (=1916+129+129 MB of loader space before and after to keep Apple's Disk Utility happy)

 

 

post-846696-0-34917400-1511428083_thumb.png

post-846696-0-05940600-1511428101_thumb.png

post-846696-0-70312800-1511560664_thumb.png

post-846696-0-99292300-1511680514_thumb.png

 

3)  Use gdisk to set correct partition type, name and attributes for the EFI System Partition and create new sdb3 for OS X Base System...

 

 

fusion71au@fusion71au-VirtualBox ~ $ sudo gdisk /dev/sdb
[sudo] password for fusion71au:
GPT fdisk (gdisk) version 0.8.8

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.

Command (? for help): t
Partition number (1-3): 1
Current type is 'Microsoft basic data'
Hex code or GUID (L to show codes, Enter = 8300): EF00
Changed type of partition to 'EFI System'
 
Command (? for help): c
Partition number (1-3): 1
Enter name: EFI
 
Command (? for help): x
 
Expert command (? for help): a
Partition number (1-3): 1
Known attributes are:
0: system partition
1: hide from EFI
2: legacy BIOS bootable
60: read-only
62: hidden
63: do not automount
 
Attribute value is 0000000000000000. Set fields are:
  No fields set
 
Toggle which attribute field (0-63, 64 or <Enter> to exit): 0
Have enabled the 'system partition' attribute.
Attribute value is 0000000000000001. Set fields are:
0 (system partition)
 
Toggle which attribute field (0-63, 64 or <Enter> to exit):  
 
Expert command (? for help): m

Command (? for help): n
Partition number (3-128, default 3): 3
First sector (34-16777182, default = 12324864) or {+-}size{KMGTP}: +129M <--- For Disk Utility loader space
Last sector (12589056-16777182, default = 16777182) or {+-}size{KMGTP}: 16511920 <--- Equals 12589056+3922864 sectors for Base System
Current type is 'Linux filesystem'
Hex code or GUID (L to show codes, Enter = 8300): AF00
Changed type of partition to 'Apple HFS/HFS+'

Command (? for help): p
Disk /dev/sdb: 16777216 sectors, 8.0 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 10D5C66B-C765-5247-9DF4-358C0FEB2208
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 16777182
Partitions will be aligned on 2048-sector boundaries
Total free space is 531468 sectors (259.5 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048          411647   200.0 MiB   EF00  
   2          411648        12324863   5.7 GiB     AF00  
   3        12589056        16511920   1.9 GiB     AF00  Apple HFS/HFS+

Command (? for help): w

Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
PARTITIONS!!

Do you want to proceed? (Y/N): y
OK; writing new GUID partition table (GPT) to /dev/sdb.
The operation has completed successfully.

 

4)  Open Terminal, type lsblk to show the system's attached disks, partitions and their mount points...

 

 


fusion71au@fusion71au-VirtualBox ~ $ lsblk
 
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0    50G  0 disk  
├─sda1   8:1    0   200M  0 part  
├─sda2   8:2    0   350M  0 part /boot
├─sda3   8:3    0    15G  0 part /
├─sda4   8:4    0  32.5G  0 part /home
└─sda5   8:5    0     2G  0 part [SWAP]
sdb      8:16   0     8G  0 disk  
├─sdb1   8:17   0   200M  0 part   
├─sdb2   8:18   0   5.7G  0 part
├─sdb3   8:19   0   1.9G  0 part
sr0     11:0    1  1024M  0 rom   

 

5)  Change directory to access the SharedSupport files in ~/Downloads

cd ~/Downloads/SharedSupport

6)  Type dmg2img -l BaseSystem.dmg to list the "partitions" in the compressed disk image file "BaseSystem.dmg"...

 

 


fusion71au@fusion71au-VirtualBox ~/Downloads/SharedSupport $ dmg2img -l BaseSystem.dmg
 
dmg2img v1.6.5 (c) vu1tur (to@vu1tur.eu.org)
 
BaseSystem.dmg --> (partition list)
 
partition 0: Protective Master Boot Record (MBR : 0)
partition 1: GPT Header (Primary GPT Header : 1)
partition 2: GPT Partition Data (Primary GPT Table : 2)
partition 3:  (Apple_Free : 3)
partition 4: disk image (Apple_HFS : 4)
partition 5:  (Apple_Free : 5)
partition 6: GPT Partition Data (Backup GPT Table : 6)
partition 7: GPT Header (Backup GPT Header : 7)

 

7)  Use the command sudo dmg2img -v -i BaseSystem.dmg -p 4 -o /dev/sdb3 to write the 4.hfs image to your "OS X Base System" volume ie sdb3 partition.

 

 


fusion71au@fusion71au-VirtualBox ~/Downloads/SharedSupport $ sudo dmg2img -v -i BaseSystem.dmg -p 4 -o /dev/sdb3
[sudo] password for fusion71au:  
 
dmg2img v1.6.5 (c) vu1tur (to@vu1tur.eu.org)
 
BaseSystem.dmg --> /dev/sdb3
 
reading property list, 52391 bytes from address 491582553 ...
partition 0: begin=203, size=430, decoded=284
partition 1: begin=948, size=430, decoded=284
partition 2: begin=1695, size=430, decoded=284
partition 3: begin=2424, size=430, decoded=284
partition 4: begin=3137, size=42778, decoded=28804
partition 5: begin=46198, size=430, decoded=284
partition 6: begin=46926, size=430, decoded=284
partition 7: begin=47671, size=430, decoded=284
 
decompressing:
opening partition 4 ...       [715] 100.00%  ok
 
Archive successfully decompressed as /dev/sdb3
 
You should be able to mount the image [as root] by:
 
modprobe hfsplus
mount -t hfsplus -o loop /dev/sdb3 /mnt

 

8)  Create mounting folders in /media/your_username 

sudo mkdir /media/fusion71au/EFI
sudo mkdir /media/fusion71au/Installer_App  

9)  Mount the Installer_App volume (corresponding to sdb2) and copy the SharedSupport folder to its root ...

sudo mount /dev/sdb2 /media/fusion71au/Installer_App  
sudo cp -R ~/Downloads/SharedSupport /media/fusion71au/Installer_App/

 10)  Mount the EFI partition, sdb1, and copy the EFI folder containing Clover into it...

sudo mount /dev/sdb1 /media/fusion71au/EFI
sudo cp -R ~/Downloads/EFI /media/fusion71au/EFI/

Clover Settings

Clover configuration is required now.  The default config.plist (in the EFI partition, /EFI/Clover folder of the USB) maybe sufficient to boot your machine if you’re lucky.  If not, look at the Clover Wiki, Clover Instructions and Clover Configuration Thread for pointers and edit /EFI/Clover/config.plist accordingly with a text editor.

The location of the important configuration files for Clover are summarized below

  • config.plist--->EFI/CLOVER folder
  • DSDT.aml with or without SSDT.aml--->EFI/CLOVER/ACPI/patched (don't need one if your DSDT is auto patched by Clover in config.plist)
  • Kexts eg FakeSMC, NullCPUPowerManagement --->EFI/CLOVER/kexts/<osx version> or /Other.  You may need to add VoodooPS2Controller for your laptop keyboard/trackpad to work.
  • If legacy booting, you need to install legacy boot sectors on the drive (boot0af, boot1f32 and boot6).  There is an automated install for this here by @StarBrilliant
  • If UEFI booting, you will most likely need one of the OsxAptioFixDrv-64 drivers copied from /EFI/CLOVER/drivers-off/drivers64UEFI to /EFI/CLOVER/drivers64UEFI.

Hint:  For newbs, you don't necessarily need Clover to boot the installer in a VMware virtual machine.  Just attach the installer (without Clover) to a macOS guest running on a VMware Windows host (patched with @Donk's unlocker program - to create the VM guest, see my VMware guide).

Boot to OS X Base System, build "Install macOS High Sierra.app" then startosinstall in Terminal

1)  Unmount sdb1 & sdb2,

 sudo umount /dev/sdb1
 sudo umount /dev/sdb2

then reboot your system to the USB Installer using the system's boot device selection key eg F12 for Gigabyte motherboards, F8 for ASUS motherboards, F11 for ASrock motherboards ...

 

post-846696-0-82338900-1511429981_thumb.png

2)  Launch Disk Utility from the macOS Utilities main screen and prepare the target hard disk to install High Sierra eg "Macintosh HD", erase/formatted as HFS+j.  Hint - click View Menu to Show All Devices...

 

 

post-846696-0-92478900-1512120265_thumb.png

post-846696-0-33292400-1512120286_thumb.png

post-846696-0-90999200-1512120301_thumb.png

 

3)  Launch terminal from the macOS Utilities main screen, Utilities Menu...

 

post-846696-0-57863800-1512423901_thumb.png

4)  Type the following commands to assemble the full "Install macOS High Sierra.app" on the Installer_App volume...

-bash-3.2# cd /
-bash-3.2# cp -R Install\ macOS\ High\ Sierra.app /Volumes/Installer_App/
-bash-3.2# mv /Volumes/Installer_App/SharedSupport /Volumes/Installer_App/Install\ macOS\ High\ Sierra.app/Contents/

Terminal Hints:

  • Type the first few characters of a path, then press <Tab> key ---> rest of the path will autocomplete.
  • Pressing the <up> arrow key will duplicate the previous command entered into terminal.

5)  Start installation with the startosinstall utility in Terminal...

-bash-3.2# /Volumes/Installer_App/Install\ macOS\ High\ Sierra.app/Contents/Resources/startosinstall --volume /Volumes/Macintosh\ HD --converttoapfs NO --applicationpath /Volumes/Installer_App/Install\ macOS\ High\ Sierra.app

where "Macintosh HD" is the target volume to install High Sierra in this example...

 

post-846696-0-92831600-1511471083_thumb.png

Steps 4 and 5 can be automated with the attached "startosinstall.command" script, which will assemble "Install macOS High Sierra.app" on the "Installer_App" partition of the USB and launch the startosinstall utility targeting the "Macintosh HD" volume.  Copy/download to Installer_App volume, then run in terminal...

cd /Volumes/Installer_App
chmod +x startosinstall.command
./startosinstall.command

startosinstall.command.zip

Edited by fusion71au
update download links for 10.13.6
  • Like 7
  • Thanks 2
Link to comment
Share on other sites

 

 

Making a High Sierra USB Installer Entirely From Scratch in Linux Mint

 

Prerequisites

  1. 8GB or larger USB drive
  2. Linux Mint (virtualized is also OK, tested with Mint 17.3 & 18.1) and the following installed packages:  hfsplus, hfsprogs, gparted, gdisk and dmg2img...

 

 

 

 

Download Installer Files Directly from Apple and Clover from SourceForge
 
1)  Open terminal, create SharedSupport folder in ~/Downloads

mkdir ~/Downloads/SharedSupport

 
2)  Browse Apple's Regular Software Catalog and find the URLs to download the following 6 installer files...

  1. BaseSystem.dmg
  2. BaseSystem.chunklist
  3. InstallInfo.plist
  4. InstallESDDmg.pkg
  5. AppleDiagnostics.dmg
  6. AppleDiagnostics.chunklist

(Hint - search page for "InstallESD" to find its URL and others nearby)
 
into ~/Downloads/SharedSupport.  A browser download manager (eg Chrono for Chrome, dTA for FireFox) is handy since InstallESD is >4GB ---> allows you to pause/resume interrupted download...
 
3) Rename InstallESDDmg.pkg to InstallESD.dmg

mv ~/Downloads/SharedSupport/InstallESDDmg.pkg ~/Downloads/SharedSupport/InstallESD.dmg

4)  Edit InstallInfo.plist with a text editor to remove the chunklistURL and chunklistid keys for InstallESD, and renaming it from InstallESDDmg.pkg to InstallESD.dmg (example of edited file attached to post#1)...

 

attachicon.gifEdit InstallInfo.plist.png

5)  If you don't already have Clover installed, download the latest Clover.iso from SourceForge.  Extract the EFI folder to ~/Downloads...
 

 

 

 

 

 

Prepare USB with GParted and Restore OS X Base System with dmg2img
 
1)  Open GParted.  In this example, I have a 8GB installer disk, initialized as GPT from Device Menu... 

 

 

 

2)  Create the following 3 new partitions
 
Part 1 200MB FAT32 labelled EFI
Part 2 5812MB HFS+ labelled Installer_App
Part 3 1921MB HFS+ labelled "OS X Base System" should have 129MB free "loader" space before and after it so Apple's Disk Utility is happy...

 

 

 

3)  Use gdisk to set correct partition type, name and attributes for the EFI System Partition ...

 

 

 

fusion71au@fusion71au-VirtualBox ~ $ sudo gdisk /dev/sdb
GPT fdisk (gdisk) version 0.8.8
 
Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present
 
Found valid GPT with protective MBR; using GPT.
 
Command (? for help): v
 
No problems found. 266173 free sectors (130.0 MiB) available in 2
segments, the largest of which is 264159 (129.0 MiB) in size.
 
Command (? for help): t
Partition number (1-3): 1
Current type is 'Microsoft basic data'
Hex code or GUID (L to show codes, Enter = 8300): EF00
Changed type of partition to 'EFI System'
 
Command (? for help): c
Partition number (1-3): 1
Enter name: EFI
 
Command (? for help): x
 
Expert command (? for help): a
Partition number (1-3): 1
Known attributes are:
0: system partition
1: hide from EFI
2: legacy BIOS bootable
60: read-only
62: hidden
63: do not automount
 
Attribute value is 0000000000000000. Set fields are:
  No fields set
 
Toggle which attribute field (0-63, 64 or <Enter> to exit): 0
Have enabled the 'system partition' attribute.
Attribute value is 0000000000000001. Set fields are:
0 (system partition)
 
Toggle which attribute field (0-63, 64 or <Enter> to exit):  
 
Expert command (? for help): m
 
Command (? for help): p
Disk /dev/sdb: 16777216 sectors, 8.0 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): ED6532BB-14E1-4E3C-92FF-14E1C5F1B0A8
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 16777182
Partitions will be aligned on 2048-sector boundaries
Total free space is 266173 sectors (130.0 MiB)
 
Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048          411647   200.0 MiB   EF00  EFI
   2          411648        12578815   5.8 GiB     AF00   
   3        12578816        16513023   1.9 GiB     AF00   
 
Command (? for help): w
 
Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
PARTITIONS!!
 
Do you want to proceed? (Y/N): y
OK; writing new GUID partition table (GPT) to /dev/sdb.
The operation has completed successfully.

 

 

 

4)  Open Terminal, type lsblk to show the system's attached disks, partitions and their mount points...
 

 

fusion71au@fusion71au-VirtualBox ~ $ lsblk
 
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0    50G  0 disk  
├─sda1   8:1    0   200M  0 part  
├─sda2   8:2    0   350M  0 part /boot
├─sda3   8:3    0    15G  0 part /
├─sda4   8:4    0  32.5G  0 part /home
└─sda5   8:5    0     2G  0 part [SWAP]
sdb      8:16   0     8G  0 disk  
├─sdb1   8:17   0   200M  0 part   
├─sdb2   8:18   0   5.7G  0 part
├─sdb3   8:19   0   1.9G  0 part
sr0     11:0    1  1024M  0 rom   

 

 

5)  Change directory to access the SharedSupport files in ~/Downloads

cd ~/Downloads/SharedSupport

6)  Type dmg2img -l BaseSystem.dmg to list the "partitions" in the compressed disk image file "BaseSystem.dmg"...

 

 

fusion71au@fusion71au-VirtualBox ~/Downloads/SharedSupport $ dmg2img -l BaseSystem.dmg
 
dmg2img v1.6.5 (c) vu1tur (to@vu1tur.eu.org)
 
BaseSystem.dmg --> (partition list)
 
partition 0: Protective Master Boot Record (MBR : 0)
partition 1: GPT Header (Primary GPT Header : 1)
partition 2: GPT Partition Data (Primary GPT Table : 2)
partition 3:  (Apple_Free : 3)
partition 4: disk image (Apple_HFS : 4)
partition 5:  (Apple_Free : 5)
partition 6: GPT Partition Data (Backup GPT Table : 6)
partition 7: GPT Header (Backup GPT Header : 7)

 

 

7)  Use the command sudo dmg2img -v -i BaseSystem.dmg -p 4 -o /dev/sdb3 to write the 4.hfs image to your "OS X Base System" volume ie sdb3 partition.

 

 

 

fusion71au@fusion71au-VirtualBox ~/Downloads/SharedSupport $ sudo dmg2img -v -i BaseSystem.dmg -p 4 -o /dev/sdb3
[sudo] password for fusion71au:  
 
dmg2img v1.6.5 (c) vu1tur (to@vu1tur.eu.org)
 
BaseSystem.dmg --> /dev/sdb3
 
reading property list, 52391 bytes from address 491582553 ...
partition 0: begin=203, size=430, decoded=284
partition 1: begin=948, size=430, decoded=284
partition 2: begin=1695, size=430, decoded=284
partition 3: begin=2424, size=430, decoded=284
partition 4: begin=3137, size=42778, decoded=28804
partition 5: begin=46198, size=430, decoded=284
partition 6: begin=46926, size=430, decoded=284
partition 7: begin=47671, size=430, decoded=284
 
decompressing:
opening partition 4 ...       [715] 100.00%  ok
 
Archive successfully decompressed as /dev/sdb3
 
You should be able to mount the image [as root] by:
 
modprobe hfsplus
mount -t hfsplus -o loop /dev/sdb3 /mnt

 

 

8)  Create mounting folders in /media/your_username 

sudo mkdir /media/fusion71au/EFI
sudo mkdir /media/fusion71au/Installer_App  

9)  Mount the Installer_App volume (corresponding to sdb2) and copy the SharedSupport folder to its root ...

sudo mount /dev/sdb2 /media/fusion71au/Installer_App  
sudo cp -R ~/Downloads/SharedSupport /media/fusion71au/Installer_App/

 
10)  Mount the EFI partition, sdb1, and copy the EFI folder containing Clover into it...

sudo mount /dev/sdb1 /media/fusion71au/EFI
sudo cp -R ~/Downloads/EFI /media/fusion71au/EFI/

Clover Settings

Clover configuration is required now.  The default config.plist (in the Clover FAT32 partition of the USB) maybe sufficient to boot your machine if you’re lucky.  If not, look at the Clover Wiki, Clover Instructions and Clover Configuration Thread for pointers and edit /EFI/Clover/config.plist accordingly with Wordpad or Notepad.

 

The location of the important configuration files for Clover are summarized below

  • config.plist--->EFI/CLOVER folder
  • DSDT.aml with or without SSDT.aml--->EFI/CLOVER/ACPI/patched (don't need one if your DSDT is auto patched by Clover in config.plist)
  • Kexts eg FakeSMC, NullCPUPowerManagement --->EFI/CLOVER/kexts/<osx version> or /Other.  You may need to add VoodooPS2Controller for your laptop keyboard/trackpad to work.

 

 

 

Boot to OS X Base System, build "Install macOS High Sierra.app" then startosinstall in Terminal

 

1)  Unmount sdb1 & sdb2,

 sudo umount /dev/sdb1
 sudo umount /dev/sdb2

     then reboot your system....

 

 

2)  Launch terminal from macOS Utilities Menu

 

 

 

3)  Type the following commands to assemble the full "Install macOS High Sierra.app" on the Installer_App volume...

-bash-3.2# cd /
-bash-3.2# cp -R Install\ macOS\ High\ Sierra.app /Volumes/Installer_App/
-bash-3.2# mv /Volumes/Installer_App/SharedSupport /Volumes/Installer_App/Install\ macOS\ High\ Sierra.app/Contents/

Terminal Hints:

  • Type the first few characters of a path, then press <Tab> key ---> rest of the path will autocomplete.
  • Pressing the <up> arrow key will duplicate the previous command entered into terminal.

 
4)  Start installation with the startosinstall utility...

-bash-3.2# /Volumes/Installer_App/Install\ macOS\ High\ Sierra.app/Contents/Resources/startosinstall --volume /Volumes/Macintosh\ HD --converttoapfs NO --applicationpath /Volumes/Installer_App/Install\ macOS\ High\ Sierra.app

where "Macintosh HD" is the target volume to install High Sierra in this example.
 
 

 

 

 

Interesting, thanks @fusion72au.. :)

  • Like 1
Link to comment
Share on other sites

@ice_pdb,

 

Yes, its possible to create a GPT formatted installer disk with dmg2img for Windows, Win32 Disk Imager, Paragon Partition Manager and gdisk instead of MBR using @CVAD's Boot Disk Utility.

 

 

Procedure
1) Convert BaseSystem.dmg to BaseSystem.img with dmg2img.exe:
       In command prompt, type

dmg2img BaseSystem.dmg BaseSystem.img

post-846696-0-46272200-1511498323_thumb.png

 

 

2) Open BaseSystem.img in Win32 Disk Imager ---> write to USB drive

 

 

 

post-846696-0-21962000-1511498373_thumb.png

 

 

3) Launch Paragon PM and

  • move HFS+ OS X Base System volume to the right so 200MB free space created at the start of the drive
  • create new 200MB FAT32 partition at the start of the drive, labelled EFI
  • extend HFS+ OS X Base System volume to right (but leave approx 130MB free space at end)

 

 

post-846696-0-33760200-1511498477_thumb.png

post-846696-0-62595800-1511499192_thumb.png

post-846696-0-22740600-1511498504_thumb.png

post-846696-0-98770300-1511498525_thumb.png

 

 

 

4) Set correct name, type and partition attribute for EFI System Partition with gdisk in command prompt window.

 


H:\gdisk>gdisk64 7:   <--- This is the disk number given to the usb drive by the system.  Find out by opening "Disk Management".
GPT fdisk (gdisk) version 1.0.0

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.

Command (? for help): p
Disk 7:: 7827456 sectors, 3.7 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): ED6532BB-14E1-4E3C-92FF-14E1C5F1B0A8
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 7827422
Partitions will be aligned on 2048-sector boundaries
Total free space is 272317 sectors (133.0 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048          413695   201.0 MiB   0700  Basic data partition
   2          413696         7557119   3.4 GiB     AF00  disk image

Command (? for help): c
Partition number (1-2): 1
Enter name: EFI

Command (? for help): t
Partition number (1-2): 1
Current type is 'Microsoft basic data'
Hex code or GUID (L to show codes, Enter = 700): EF00
Changed type of partition to 'EFI System'

Command (? for help): x

Expert command (? for help): a
Partition number (1-2): 1
Known attributes are:
0: system partition
1: hide from EFI
2: legacy BIOS bootable
60: read-only
62: hidden
63: do not automount

Attribute value is 0000000000000000. Set fields are:
  No fields set

Toggle which attribute field (0-63, 64 or <Enter> to exit): 0
Have enabled the 'system partition' attribute.
Attribute value is 0000000000000001. Set fields are:
0 (system partition)

Toggle which attribute field (0-63, 64 or <Enter> to exit):

Expert command (? for help): p
Disk 7:: 7827456 sectors, 3.7 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): ED6532BB-14E1-4E3C-92FF-14E1C5F1B0A8
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 7827422
Partitions will be aligned on 2048-sector boundaries
Total free space is 272317 sectors (133.0 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048          413695   201.0 MiB   EF00  EFI
   2          413696         7557119   3.4 GiB     AF00  disk image

Expert command (? for help): w

Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
PARTITIONS!!

Do you want to proceed? (Y/N): y
OK; writing new GUID partition table (GPT) to \\.\physicaldrive7.
Disk synchronization succeeded! The computer should now use the new
partition table.

Expert command (? for help): m

Command (? for help): q

 


 

Final result ...

post-846696-0-20349600-1511498895_thumb.png

5) Open TransMac to copy downloaded files in /SharedSupport folder from NTFS Windows drive to /Install macOS High Sierra.app/Contents on "OS X Base System" HFS volume

6) Install Clover in Windows - see guide here :).  

 

Post#1 is for UEFI systems  ---> only need to copy CLOVER folder into /EFI on the EFI System Partition + replace /EFI/BOOT/BOOTX64.efi with Clover's BOOTX64.efi.  

 

Post#3 for legacy BIOS systems ---> need to also install boot sectors (boot0af, boot1f32 in MBR/PBR with Bootice Program) and boot6 or boot7 in the root / of the EFI partition.

 

Note: the MBR installer made with @CVAD's Boot Disk Utility already has legacy boot sectors for Clover installed ---> should work with BOTH legacy and UEFI systems.

  • Like 2
Link to comment
Share on other sites

  • 1 month later...

 

Making a High Sierra USB Installer Entirely From Scratch in Windows

This is a proof of concept tutorial, to show it's possible to create a vanilla High Sierra installer, entirely from scratch, in Windows (even without App Store downloaded "Install macOS High Sierra.app" from a real Mac :whistle:).  @PikeRAlpha's link to Apple's Software Catalog provides us with all the URLs necessary to download the needed files directly from Apple instead of some dubious source from the internet...

 

attachicon.gifApple SW Catalog URLs Pike's Universum.png

Pre-Requisites

  1. 8GB or larger USB drive
  2. Boot Disk Utility v2.1.2017rev021b from @CVAD
  3. TransMac (free 15 day trial)
  4. Paragon Hard Disk Manager Free

 

Download Installer Files Directly from Apple

1)  Browse Apple's Regular Software Catalog and find the URLs to download the following 6 installer files...

  1. BaseSystem.dmg
  2. BaseSystem.chunklist
  3. InstallInfo.plist
  4. InstallESDDmg.pkg
  5. AppleDiagnostics.dmg
  6. AppleDiagnostics.chunklist

(Hint - search page for "InstallESD" to find its URL and others nearby)

attachicon.gifApple SW Catalog Find InstallESD in browser.png

 

to a folder named "SharedSupport" on your Windows NTFS drive.  A browser download manager (eg Chrono for Chrome, dTA for FireFox) is handy since InstallESD is >4GB ---> allows you to pause/resume interrupted download...

 

attachicon.gifApple SW Catalog List of Download Manager Downloads.png

2)  Rename InstallESDDmg.pkg to InstallESD.dmg

 

 

 

3)  Edit InstallInfo.plist with WordPad/text editor to remove the chunklistURL and chunklistid keys for InstallESD, and renaming it from InstallESDDmg.pkg to InstallESD.dmg (example of edited file attached to this post)...

 

 

 

 

 

Boot Disk Utility to format the Installer USB and Restore OS X Base System HFS partition

1.  Format USB with BDU & latest Clover ---> creates boot files in CLOVER partition + second FAT partition

 

 

 

2.  Extract 4.hfs from \SharedSupport\BaseSystem.dmg with BDU --> save to it's local folder

 

 

 

3.  Restore 4.hfs to USB second partition with BDU --->  2nd partition becomes bootable "OS X Base System"

 

 

 

 

 

Paragon Hard Disk Manager to extend HFS Partition to its Full Extent

Open Paragon Partition Manager Free and resize the second partition of the USB drive to the full size allowed.  Don't forget to apply the changes at the end...

 

 

 

 

Transmac to Copy "SharedSupport" folder to OS X Base System

1.  Open the TransMac program and navigate to the HFS+ Volume/Install macOS High Sierra.app/Contents folder.  Right click anywhere in the empty space on the RHS pane and select "Copy Here"...

 

 

 

2.  In the next stage, select the "SharedSupport" folder we created above as the "Files and Folders to be copied to the Mac Volume"...

 

 

 

 

 

 

Clover Settings

Clover configuration is required now.  The default config.plist (in the Clover FAT32 partition of the USB) maybe sufficient to boot your machine if you’re lucky.  If not, look at the Clover Wiki, Clover Instructions and Clover Configuration Thread for pointers and edit /EFI/Clover/config.plist accordingly with Wordpad or Notepad.

 

The location of the important configuration files for Clover are summarized below

  • config.plist--->EFI/CLOVER folder
  • DSDT.aml with or without SSDT.aml--->EFI/CLOVER/ACPI/patched (don't need one if your DSDT is auto patched by Clover in config.plist)
  • Kexts eg FakeSMC, NullCPUPowerManagement --->EFI/CLOVER/kexts/<osx version> or /Other. NB BootDiskUtility by default already has FakeSMC.kext installed here.  You may need to add VoodooPS2Controller for your laptop keyboard/trackpad to work.
  • If UEFI booting, you will most likely need one of the OsxAptioFixDrv-64 drivers copied from /EFI/CLOVER/drivers-off/drivers64UEFI to /EFI/CLOVER/drivers64UEFI.

 

If you want to use the installer to run High Sierra in Windows on VMware, you can follow my guide to set up the Virtual Machine and replace Clover's default config with EFI_Clover for VMware (which is compatible to run in VMware).  In the screenshots below, I have attached the USB Installer (in this case PhysicalDrive7) to my macOS Virtual Machine.  Reboot the system to the USB installer to install High Sierra :)...

 

 

 

 

 

What happens if we don't have access to TransMac or Paragon Hard Disk Manager?

Not a problem, as long as we get "OS X Base System" bootable, we can launch terminal from the Utilities Menu to copy the SharedSupport folder over to the Installer app.  In essence, we will build the full installer app = 5GB+ on the target HD eg "Macintosh HD", by copying both the "small" installer app = 15MB (on "OS X Base System") and the SharedSupport folder from the NTFS volume (mounted in this example on /Volumes/DATA)...

-bash-3.2# cd /
-bash-3.2# cp -R Install\ macOS\ High\ Sierra.app /Volumes/Macintosh\ HD/
-bash-3.2# cp -R /Volumes/DATA/SharedSupport /Volumes/Macintosh\ HD/Install\ macOS\ High\ Sierra.app/Contents/

 

 

...then start installation with the startosinstall utility...

-bash-3.2# /Volumes/Macintosh\ HD/Install\ macOS\ High\ Sierra.app/Contents/Resources/startosinstall --volume /Volumes/Macintosh\ HD --converttoapfs NO --applicationpath /Volumes/Macintosh\ HD/Install\ macOS\ High\ Sierra.app

 

 

 

The above steps can be automated with the attached "startosinstall.command" script, which will assemble "Install macOS High Sierra.app" on "Macintosh HD" and launch the startosinstall utility targeting the "Macintosh HD" volume.  Copy/download to "Macintosh HD", then run in terminal (after attaching DATA USB with /Shared Support folder)...

cd "/Volumes/Macintosh HD"
chmod +x startosinstall.command
./startosinstall.command

 

I tried it and it all went well. I made a image from the usb and it successfully booted a virtual box vm. After Installer did copied files to the drive it went for a reboot. after that I booted it with clover, Installer showed up again to continue installation but suddenly showed this error:

macOS could not be installed on your computer

The path /System/Installation/Packages/OSInstall.mpkg appears to be missing or damaged.

Quit the installer to restart your computer and try again.

 

any idea what I should do?

Link to comment
Share on other sites

The path /System/Installation/Packages/OSInstall.mpkg appears to be missing or damaged.

Quit the installer to restart your computer and try again.

 

any idea what I should do?

 

First, verify the SHA1 checksum of your InstallESD.dmg and BaseSystem.dmg with the correct ones at this website.

 

Eg for "Install macOS High Sierra.app" 10.13.2_17C88, SHA1 in Terminal...

fusion71aus-iMac:~ fusion71au$ shasum /Applications/Install\ macOS\ High\ Sierra.app/Contents/SharedSupport/InstallESD.dmg 
49e336085247331ea6033ebd3598a827caa6596e  /Applications/Install macOS High Sierra.app/Contents/SharedSupport/InstallESD.dmg
fusion71aus-iMac:~ fusion71au$ shasum /Applications/Install\ macOS\ High\ Sierra.app/Contents/SharedSupport/BaseSystem.dmg 
209d6a382026115a30c79f0825aec1b7a4cdb2dd  /Applications/Install macOS High Sierra.app/Contents/SharedSupport/BaseSystem.dmg

The OSInstall.mpkg error can sometimes be due to "stale data" in /macOS Install Data (time stamp/IAEndDate in OSInstallAttr.plist too old).  Easiest to erase target drive and start again...

 

If using VirtualBox, follow instructions exactly as per post#75.

 

If using VMware, follow instructions as per post#41.

Link to comment
Share on other sites

  • 3 months later...
21 hours ago, roon83 said:

One of them is the chunklist and the other is a dmg file so they are different. 

no, no, when you do a search on the xml to Apple's files there are two links for each of the sox files, are they redundancy links?

Link to comment
Share on other sites

  • 4 weeks later...

Thank you so much for this great effort. My os stopped booting. So I have followed the steps as stated above. except the step below. All i want to do is use the installer created above to install my mac os. My question is Do i need to do the clover settings below? 2. I tried installing with all the steps above, so i attached the usb to my system and I was greeted with OS X Base System and EFI Boot... I choose egi boot... then clover came up ..it was trying to install , then my mac made 3 sounds continously, i gues it wasnt working ,lol) so i restarted the mac and I choose OS Xbase system...that also was installing suddenly it failed.

 

How do i install high sierra with all the steps I have done above... and do i need clover setting below. If i need it, how can i apply it, thanks

 

On 12/26/2017 at 6:57 AM, dindu5678 said:

Clover Settings

Clover configuration is required now.  The default config.plist (in the Clover FAT32 partition of the USB) maybe sufficient to boot your machine if you’re lucky.  If not, look at the Clover Wiki, Clover Instructions and Clover Configuration Thread for pointers and edit /EFI/Clover/config.plist accordingly with Wordpad or Notepad.

 

The location of the important configuration files for Clover are summarized below

  • config.plist--->EFI/CLOVER folder
  • DSDT.aml with or without SSDT.aml--->EFI/CLOVER/ACPI/patched (don't need one if your DSDT is auto patched by Clover in config.plist)
  • Kexts eg FakeSMC, NullCPUPowerManagement --->EFI/CLOVER/kexts/<osx version> or /Other. NB BootDiskUtility by default already has FakeSMC.kext installed here.  You may need to add VoodooPS2Controller for your laptop keyboard/trackpad to work.
  • If UEFI booting, you will most likely need one of the OsxAptioFixDrv-64 drivers copied from /EFI/CLOVER/drivers-off/drivers64UEFI to /EFI/CLOVER/drivers64UEFI.

 

Link to comment
Share on other sites

  • 3 months later...

Comparing these two files from the Apple Catalog...

 

http://swcdn.apple.com/content/downloads/07/20/091-95774/awldiototubemmsbocipx0ic9lj2kcu0pt/InstallInfo.plist
http://swcdn.apple.com/content/downloads/29/03/091-94326/45lbgwa82gbgt7zbgeqlaurw2t9zxl8ku7/InstallInfo.plist

 

I noticed different version numbers: 10.13.6.0.0.1532145923 and 10.13.6.0.0.1530695593

 

Are they both release versions?

 

Link to comment
Share on other sites

14 hours ago, CrazyTeeka said:

Comparing these two files from the Apple Catalog...

 


http://swcdn.apple.com/content/downloads/07/20/091-95774/awldiototubemmsbocipx0ic9lj2kcu0pt/InstallInfo.plist

http://swcdn.apple.com/content/downloads/29/03/091-94326/45lbgwa82gbgt7zbgeqlaurw2t9zxl8ku7/InstallInfo.plist

 

I noticed different version numbers: 10.13.6.0.0.1532145923 and 10.13.6.0.0.1530695593

 

Are they both release versions?

 

 

Yes, both are release versions of High Sierra 10.13.6:

 

http://swcdn.apple.com/content/downloads/29/03/091-94326...---> corresponds to build 10.13.6.17G65

http://swcdn.apple.com/content/downloads/07/20/091-95774...---> corresponds to build 10.13.6.17G2208 (with latest security update).

 

Edited by fusion71au
Link to comment
Share on other sites

  • 4 weeks later...
8 hours ago, Manash420 said:

@fusion71au How to identify the macOs version of baseSystem.dmg and  InstallESD.dmg from the apple catalogue?

 

Download, then open the corresponding English.dist file in a text editor.  

 

Eg BaseSystem.dmg and InstallESDDmg.pkg for Mojave Beta11_18A389 have the following URLs...

 

http://swcdn.apple.com/content/downloads/42/45/091-62771/dsx32mbizk8mo8nx84umbwp5iknyxpgyxc/BaseSystem.dmg

http://swcdn.apple.com/content/downloads/42/45/091-62771/dsx32mbizk8mo8nx84umbwp5iknyxpgyxc/InstallESDDmg.pkg

 

Corresponding English.dist file URL is

https://swdist.apple.com/content/downloads/42/45/091-62771/dsx32mbizk8mo8nx84umbwp5iknyxpgyxc/091-62771.English.dist

 

Opening this file in text editor shows this ...

 

English_dist.png.b5e0584855107650a2ed77b5ab32d095.png

Link to comment
Share on other sites

  • 2 weeks later...
  • 4 weeks later...
 Share

×
×
  • Create New...